home *** CD-ROM | disk | FTP | other *** search
- Path: detroit.freenet.org!ab411
- From: ab411@detroit.freenet.org (David R. Conrad)
- Newsgroups: comp.lang.c
- Subject: Re: Tradition or what?
- Date: 9 Mar 1996 14:24:27 GMT
- Organization: Greater Detroit Free-Net, Detroit, MI
- Message-ID: <4hs4ar$q1m@detroit.freenet.org>
- References: <825289080snz@genesis.demon.co.uk> <4g0elg$mdr@redstone.interpath.net> <Dn4wML.5LJ@undergrad.math.uwaterloo.ca> <82495
- Reply-To: ab411@detroit.freenet.org (David R. Conrad)
- NNTP-Posting-Host: detroit.freenet.org
-
-
- In a previous article, fred@genesis.demon.co.uk (Lawrence Kirby) says:
-
- >In article <4gqdop$jfo@redstone.interpath.net>
- > softbase@mercury.interpath.net
- > "Scott McMahan - Softbase Systems" writes:
- >
- >>Speaking of bizarre return values, do people realize 0 is used to mean
- >>both success, failure, and a valid return value in the standard
- >>library!? All three in the same library!
- >
- >I don't find that to be a great problem. The semantics of each function
- >usually suggest quite naturally what 0 should mean.
-
- With apologies to the original author; I only saved the text, not
- the attribution.
-
- -=-=-
-
- Zero is an enigmatic value.
-
- It can mean success (fclose) or failure (scanf).
-
- It can mean black or white.
-
- It can mean no permissions (chmod) or all permissions (umask).
-
- It can mean now (setjmp) or later (atexit).
-
- It can mean the beginning (lseek) or the end (read).
-
- It can mean myself (getpgrp) or child (fork).
-
- It can mean all (kill's 1st argument) or nothing (kill's 2d argument).
-
- It can mean `default' (SIG_IGN) or `I don't care' (waitpid)
- or `try to guess' (strtol).
-
- Indeed 0 lets you talk to God (setuid).
-
- Verily is 0 all things to all people.
-
- -=-=-
-
- --
- David R. Conrad, conrad@detroit.freenet.org PGP key on GDFN Hardware and
- http://detroit.freenet.org/staff/conrad home page Software Committee
- "If you can't say 'fuck', you can't say 'fuck the government'." --Lenny Bruce
- "We had to destroy the Global Electronic Village in order to save it." --Exon
-